<?php
/**
 * Created by Alan.
 * User: Alan
 * Date: 2018\10\8 0008
 * Time: 10:57
 */

namespace app\common\service;


class City
{
    public function getNomalCityByParentId()
    {
        if(!request()->isPost()){
            return show(0,'error');
        }

        $parentId = intval(input('post.parent_id',0));
        if(!$parentId){
            return show(0,'error');
        }

        $cities = City::getNomalCityByParentId($parentId);
        if($cities){
            return show($cities,'success',200);
        }
        else {
            return show(0,'error');
        }
    }
}